import request from '@/utils/request'

// 课程作业 列表
export function homeworkPage(query) {
  return request({
    url: '/homework/homework/page',
    method: 'get',
    params: query
  })
}

// 课程作业 创建
export function homeworkCreate(data) {
  return request({
    url: '/homework/homework/add',
    method: 'post',
    data
  })
}

// 课程作业 修改
export function homeworkUpdate(data) {
  return request({
    url: '/homework/homework/add',
    method: 'post',
    data
  })
}

// 课程作业 删除
export function homeworkDelete(data) {
  return request({
    url: '/homework/homework/del',
    method: 'get',
    params: data
  })
}

// 学生 作业列表
export function studentHomeworkCommitPage(data) {
  return request({
    url: '/homework/student-homework/list',
    method: 'get',
    params: data
  })
}

// 老师 作业列表
export function teacherHomeworkCommitPage(data) {
  return request({
    url: '/homework/teacher-homework/list',
    method: 'get',
    params: data
  })
}

// 教授 作业列表
export function professorHomeworkCommitPage(data) {
  return request({
    url: '/homework/professor-homework/list',
    method: 'get',
    params: data
  })
}

// 课程作业提交
export function homeworkCommit(data) {
  return request({
    url: '/homework/homework-commit/commit',
    method: 'post',
    data
  })
}

// 课程作业提交 修改
export function homeworkCommitUpdate(data) {
  return request({
    url: '/homework/homework-commit/add',
    method: 'post',
    data
  })
}

// 作业列表-老师  获取教授账户
export function teacherHomeworkGetProfessorInfo(data) {
  return request({
    url: '/homework/homework/get-professor',
    method: 'get',
    params: data
  })
}

// 作业列表-老师  创建教授账户
export function teacherHomeworkCreateProfessor(data) {
  return request({
    url: '/homework/homework/create-professor',
    method: 'get',
    params: data
  })
}

